Singleton pattern
- 网络单例模式
-
Many people from different programming backgrounds should be familiar with the Singleton Pattern .
很多有着不同开发背景得人都会比较熟悉单例模式。
-
Through this functionality , you can use the popular singleton pattern .
通过使用这种功能,您可以使用流行的单例模式。
-
The Practice of Using Singleton Pattern in . NET
单件模式在.NET中的应用实践
-
Using C # 2.0 Generics to achieve a reusable Singleton pattern
使用C2.0泛型来完成单例模式的重用
-
Implementing and application of the Singleton pattern in VB
Singleton模式在VB中的实现和应用
-
Doing so creates an instance of the Singleton Pattern in the Model Explorer .
执行此操作将会在模型浏览器中生成一个Singleton模式的实例。
-
Singleton pattern makes construction method of the class protected , and ensures only one instance to be created .
Singleton模式把类的构造方法隐藏在静态方法后面,保证系统中仅有1个类的实例被创建。
-
This is a standard PHP singleton pattern .
这是一个标准的PHP单元素模式。
-
In the program the author apply observer pattern , composite pattern , factory pattern and singleton pattern .
在系统中使用了观察者模式、合成模式、简单工厂模式和单例模式。
-
The singleton pattern can be used to delay the initialization of an object as long as possible .
单元素模式可以用来尽可能久地延迟对象的初始化。
-
Using some excellent designs patterns in the design , such as factory model , proxy pattern and singleton pattern .
同时,在设计体系架构时,使用了一些优秀的设计模式,如工厂模式,代理模式、单例模式等。
-
To create an instance of the Factory Method Pattern , perform the same steps as for the Singleton Pattern .
要创建Factory方法模式的实例,执行同Singleton模式相同的步骤。
-
The Singleton pattern applies to situations in which there needs to be a single instance of a class .
单例模式支持那些需要只保存一个单独的实例的类。
-
Create a private attribute for the Singleton Pattern called_instance .
为Singleton模式创建私有属性,称为instance。
-
The framework adopts object broker in singleton pattern to implement data access , effectively enhances the efficiency of connection ;
框架采用了单实例的对象代理来实现数掘访问,有效地提高了连接操作的效率;
-
As its name suggests , the Singleton Pattern is typically used when you want only one instance of a particular class .
如其名称所暗示的,当您想要特别类的仅仅一个实例时,才使用Singleton模式。
-
Drag and drop the Singleton Pattern instance from the Pattern Explorer into the UML Class Diagram view .
将Singleton模式实例从模式浏览器中拖拽到UML类图视图中。
-
However , the project had two closely related scenarios where the singleton pattern proved useful : for logging and exception handling .
不过本项目中有两个紧密相关的场景可以证明独立模式是有用的:可以用于日志记录和异常处理。
-
Create two methods for the Singleton Pattern : The constructor is private , and there is one public method called getInstance () .
为Singleton模式创建两个方法:构造函数是私有的,且有一个公有的方法,称为getInstance()。
-
The singleton pattern is baked directly into Scala and is used anywhere you would use static methods or variables in the Java language .
单例模式被直接内置在Scala中,可以替代Java语言中的静态方法或变量。
-
Most caches are implemented using the Singleton pattern involving a static reference to a top level Cache class as shown in this example .
使用Singleton模式实现的大多数缓存都涉及本例所示的对顶级Cache类的静态引用。
-
If we follow a straight singleton pattern for PoIdGenerator , this can be problematic .
如果我们使用PoIdGenerator的直接单一模式,可能会出现问题。
-
To facilitate this , the plug-in class implements the singleton pattern : It stores a reference to itself in a private class variable .
为了使这一点更方便,插件类实现单模式(singletonpattern):它在私有类变量中存储一个自身的引用。
-
The singleton pattern is probably one of the most often used OOP design patterns ; it restricts the number of object instances of a class to one .
单例模式可能是最常用的OOP设计模式之一了;它限制了一个类的对象实例数只能为1。
-
You use this function to initialize static variables , enforce the singleton pattern , or perform any other necessary work before a class is usable .
你可以用这个函数来初始化静态成员变量,强制使用单例模式,或者实现其它任何在类型的实例可用前应该完成的工作。
-
Agricultural Expert System Platform is characterized by complexity . The paper applies Strategy Pattern , Composite Pattern , Command Pattern , Singleton Pattern and Facade Pattern to the system .
鉴于农业专家平台系统的复杂性,论文提出了运用策略模式、组合模式、命令模式、单例模式以及门面模式构建农业专家系统。
-
This setup means that no matter which thread uses this class in the Singleton Pattern , whenever that public method is called , it should output the same value .
这个测试类的意思就是不论那个线程在任何时候,在单例下调用这个类公共方法,都将返回相同的值。
-
Using the Singleton pattern we guarantee that no matter how many times the BusinessLayerProxy tries to create a CommandFactory , only one instance will exist .
使用Singleton模式,我们可以保证无论BusinessLayerProxy多少次尝试建立CommandFactory,也只存在一个实例。
-
In the case of eg.a singleton pattern using the constructor this can have severe consequences and lead to seemingly random null reference exceptions .
单一模式使用构造函数可能会导致严重后果,会带来类似随机的空参数异常。
-
The singleton pattern ensures that only a single instance of a class is normally used by an application , but still allows alternate instances to be created as required .
单元素模式可以确保应用程序通常只使用类的单个实例,但是仍然允许根据需要创建备用实例。